$(document).ready(function(){

});

function updatepassword(){
    var password1 = $("input[name='password1']").val();
    var password2 = $("input[name='password2']").val();
    var password3 = $("input[name='password3']").val();


    $.ajax({
        url: "/user/updatepassword",
        type: 'GET',
        data: {
            "password1": password1,
            "password2": password2,
            "password3": password3
},
    dataType: "JSON",
        async: false,
        success: function (res) {
        if(res.code === "200") {
            window.location.href = "/loginout";
        }else {
            alert(res.msg)
        }
    },
    error: function (e){
        alert('发生错误')
    }

})

}
